<!--#include file="lib/utf-8.asp"-->
<%
function ulen(byval str)
	Dim RegExpObj,ReGCheck
	Set RegExpObj=new RegExp
	RegExpObj.Pattern="^[\u4e00-\u9fa5|\uFF00-\uFFFF]+$"
	Dim l,t,c,i
	l=Len(str)
	t=l
	For i=1 to l
		c=Mid(str,i,1)
		ReGCheck=RegExpObj.test(c)
		If ReGCheck Then
			t=t+1
		End If
	Next
	Set RegExpObj=nothing
	ulen=t
end function
str1="测试.,（）"
 str2="22"
 response.write ulen(str1)

%>
